

#ifndef _UDBOSNAP_H
#define _UDBOSNAP_H

#include "zadesk.h"

#pragma warning (disable: 4786)

#pragma pack (push, 8)

class UcDbCustomOsnapInfo : public UcRxObject {
public:
    UCRX_DECLARE_MEMBERS(UcDbCustomOsnapInfo);

virtual Ucad::ErrorStatus   getOsnapInfo(
                           UcDbEntity*           pickedObject,
                           ZSoft::GsMarker       gsSelectionMark,
                           const UcGePoint3d&    pickPoint,
                           const UcGePoint3d&    lastPoint,
                           const UcGeMatrix3d&   viewXform,
                           UcArray<UcGePoint3d>& snapPoints,
                           UcDbIntArray &     geomIdsForPts,
                           UcArray<UcGeCurve3d*>& snapCurves,
                           UcDbIntArray &     geomIdsForLines) = 0;
};

class UcGiGlyph : public UcGiDrawable
{
public:
    UCRX_DECLARE_MEMBERS(UcGiGlyph);

    virtual Ucad::ErrorStatus setLocation(const UcGePoint3d& dcsPoint) = 0;

    virtual ZSoft::UInt32   setAttributes(UcGiDrawableTraits*)
                         { return 0; }

    virtual ZSoft::Boolean  worldDraw(UcGiWorldDraw*) {return ZSoft::kFalse;};

    virtual void            viewportDraw(UcGiViewportDraw* vportDrawContext) = 0;

    virtual ZSoft::Boolean  isPersistent() const		{return ZSoft::kFalse;}
    virtual UcDbObjectId    id() const					{return 0;}
    virtual void            setGsNode(UcGsNode* pNode)	{ UcGiDrawable::setGsNode(pNode); }
    virtual UcGsNode*       gsNode() const				{ return UcGiDrawable::gsNode(); }
};

class UcDbCustomOsnapMode {
  public:

    virtual const ZTCHAR * localModeString() const = 0;
    virtual const ZTCHAR * globalModeString() const = 0;

    virtual const UcRxClass* entityOsnapClass() const = 0;

    virtual UcGiGlyph* glyph() const = 0;

    virtual const ZTCHAR *               tooltipString() const = 0;
    virtual ~UcDbCustomOsnapMode() {}
};

class UcDbCustomOsnapManager {
public:
	virtual ~UcDbCustomOsnapManager(){}
    virtual Ucad::ErrorStatus addCustomOsnapMode(UcDbCustomOsnapMode* pMode) = 0;

    virtual Ucad::ErrorStatus removeCustomOsnapMode(UcDbCustomOsnapMode* pMode) = 0;

    virtual Ucad::ErrorStatus activateOsnapMode(const ZTCHAR * modeStr) = 0;

    virtual Ucad::ErrorStatus deactivateOsnapMode(const ZTCHAR * modeStr) = 0;

    virtual ZSoft::Boolean modeIsActive(const ZTCHAR * modeStr) = 0;

    virtual int osnapGlyphSize() const = 0;
};

UcDbCustomOsnapManager* ucdbCustomOsnapManager();

#pragma pack (pop)

#endif  

